package cn.imnaer.service.rpc.scenic.dao;

import cn.imnaer.database.BaseDao;
import cn.imnaer.database.define.DBConstant;
import cn.imnaer.service.persistence.model.UserScenicInfo;

public class UserScenicDaoImpl extends  BaseDao<UserScenicInfo>{
	private static   UserScenicDaoImpl  instance=  new UserScenicDaoImpl();
	
	public static UserScenicDaoImpl  getInstance(){
		return  instance;
		
	}

	@Override
	protected String getDbSpaceName() {
		return DBConstant.SPACE.SCENIC_INFO_SPACE;
	}

	@Override
	protected String getDbCollectionName() {
		// TODO Auto-generated method stub
		return  "user_scenic_info_collection";
	}

	@Override
	protected String getPrimaryKey() {
		// TODO Auto-generated method stub
		return "userScenicInfoId";
	}
	@Override
	public synchronized void generateId(UserScenicInfo obj) {
		super.generateId(obj);
	String userScenicInfoId=	obj.getUserScenicInfoId();
     obj.setUserScenicInfoId("c"+ userScenicInfoId);	
	
	}
}
